<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./echarts/echarts.min.js"></script>
</head>

<body>
  <div class="main" style="width: 800px;height: 400px;"></div>
  <script>
    const myEcharts = echarts.init(document.querySelector('.main'))
    const option = {
      // color: ['red', 'blue'],
      title: {
        text: '薪资 Salary'
      },
      tooltip: {
        trigger: 'axis'
      },
      legend: {
        
      },
      grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
      },
      xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['武湖马哥', '武湖翔哥', '段强', '石静', '王强', '李子威', '王金博']
      },
      yAxis: {
        type: 'value'
      },
      series: [
        {
          name: '期望薪资',
          type: 'line',
          data: [120, 132, 101, 134, 90, 230, 210],
          smooth: true,
          symbol: 'none',
          itemStyle: {
            color: '#ee6666'
          }
        },
        {
          name: '实际薪资',
          type: 'line',
          data: [220, 182, 191, 234, 290, 330, 310],
          smooth: true,
          symbol: 'none',
          itemStyle: {
            color: '#5470c6'
          }
        }
      ]
    };

    myEcharts.setOption(option)

  </script>
</body>

</html>